<?php

namespace app\member\controller;

use app\admin\model\Login as ModelLogin;
use app\common\controller\Frontend;

class Member extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = 'default';

    public function index()
    {
        if (empty(session("memberinfo"))) {
            $this->error("请登录", 'member/login/index');
        }
        $member = session('memberinfo');
        $memberinfo = ModelLogin::where('id', $member->id)->find();
        // var_dump($member->id);
        $this->assign('memberinfo', $memberinfo);
        return $this->view->fetch();
    }
}